import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'layout',
      component: () => import('../views/LayOut.vue'),
      children: [
        {
          path: '/LianLianKan',
          name: 'LianLianKan',
          component: () => import('../views/games/LianLianKan.vue'),
        },
        {
          path: '/saolei',
          name: 'saolei',
          component: () => import('../views/games/SaoLei.vue'),
        },
        {
          path: '/huarong',
          name: 'huarong',
          component: () => import('../views/games/HuaRong.vue'),
        },
        {
          path: '/game2048',
          name: 'game2048',
          component: () => import('../views/games/GameP2048.vue'),
        },
        {
          path: '/tetris',
          name: 'tetris',
          component: () => import('../views/games/TetrisGame.vue'),
        },
        {
          path: '/snake',
          name: 'snake',
          component: () => import('../views/games/SnakeEat.vue'),
        },
        {
          path: '/brick',
          name: 'brick',
          component: () => import('../views/games/BrickHit.vue'),
        },
      ]
    }
  ]
})
export default router
